/**
 * Browsers.java
 * Version: 1.0
 * Created in 06/08/2013
 * Created by Gerson Groth
 * 
 * Copyright
 */
package webcrawler.activities.view.utils;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.safari.SafariDriver;

/**
 * @author Gerson Groth
 * 
 */
public enum Browsers {
	CHROME(
			"Chrome") {
		@Override
		public ChromeDriver getDriver() {
			return new ChromeDriver();
		}
	},
	FIREFOX(
			"Firefox") {
		@Override
		public FirefoxDriver getDriver() {
			return new FirefoxDriver();
		}
	},
	SAFARI(
			"Safari") {
		@Override
		public SafariDriver getDriver() {
			return new SafariDriver();
		}
	},
	IE(
			"Internet Explorer") {
		@Override
		public InternetExplorerDriver getDriver() {
			return new InternetExplorerDriver();
		}
	};

	private String name;

	private Browsers(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return this.name;
	}

	public abstract WebDriver getDriver();
}
